﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TestPDChart
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
         
            prpsChart1.Dock = DockStyle.Fill;
            timer1.Interval = 20;
            timer1.Enabled = true;

        }

        protected int Count = 0;

        private void timer1_Tick(object sender, EventArgs e)
        {
           // timer1.Enabled = false;
            double[, ] data = new double[50, 72];

            if (Count == 0)
            {
                timer1.Enabled = false;

            }

            Count--;

            for (int i = 0; i < 50; i++)
            {
                for (int j = 0; j < 72; j++)
                {
                    data[i, j] = (i + Count) / 100.0;
                }
            }

            // data 是 百分比数组，最小为0， 最大为1
            prpsChart1.Set(data);

            System.Diagnostics.Debug.WriteLine(Count);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
